package com.yonyou.cyxdms.sysAuth.service.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 业务往来客户资料
 * </p>
 *
 * @author quankk
 * @since 2019-07-05
 */
@TableName("tm_part_customer")
public class PartCustomerPO extends DMSBasePO<PartCustomerPO> {

    private static final long serialVersionUID = 1L;

    /**
     * PART_CUSTOMER_ID
     */
        @TableId(value = "PART_CUSTOMER_ID", type = IdType.AUTO)
        private Integer partCustomerId;
    /**
     * 经销商代码
     */
    @TableField("DEALER_CODE")
    private String dealerCode;
    /**
     * 客户代码
     */
    @TableField("CUSTOMER_CODE")
    private String customerCode;
    /**
     * 业务往来客户类型,关联tt_customer_basedata表的basedata_id
     */
    @TableField("CUSTOMER_TYPE_CODE")
    private Integer customerTypeCode;
    /**
     * 客户名称
     */
    @TableField("CUSTOMER_NAME")
    private String customerName;
    /**
     * 客户拼音
     */
    @TableField("CUSTOMER_SPELL")
    private String customerSpell;
    /**
     * 客户简称
     */
    @TableField("CUSTOMER_SHORT_NAME")
    private String customerShortName;
    /**
     * 地址
     */
    @TableField("ADDRESS")
    private String address;
    /**
     * 邮编
     */
    @TableField("ZIP_CODE")
    private String zipCode;
    /**
     * 联系人
     */
    @TableField("CONTACTOR_NAME")
    private String contactorName;
    /**
     * 联系人电话
     */
    @TableField("CONTACTOR_PHONE")
    private String contactorPhone;
    /**
     * 联系人手机
     */
    @TableField("CONTACTOR_MOBILE")
    private String contactorMobile;
    /**
     * 传真
     */
    @TableField("FAX")
    private String fax;
    /**
     * 价格系数
     */
    @TableField("PRICE_RATE")
    private Double priceRate;
    /**
     * 销售基价
     */
    @TableField("SALES_BASE_PRICE_TYPE")
    private Integer salesBasePriceType;
    /**
     * 资料来源
     */
    @TableField("DATA_SOURCES")
    private Integer dataSources;
    /**
     * 是否有效
     */
    @TableField("IS_VALID")
    private Integer isValid;
    @TableField("ORGANIZATION_ID")
    private Integer organizationId;
    /**
     * 绋庣巼
     */
    @TableField("TAXES")
    private Double taxes;
    /**
     * 账户名
     */
    @TableField("ACCOUNT_NAME")
    private String accountName;
    /**
     * 银行账号
     */
    @TableField("ACCOUNT")
    private String account;
    /**
     * 开户行
     */
    @TableField("BANK_NAME")
    private String bankName;
    /**
     * 第二账户名
     */
    @TableField("ACCOUNT_NAME_SECOND")
    private String accountNameSecond;
    /**
     * 第二银行账号
     */
    @TableField("ACCOUNT_SECOND")
    private String accountSecond;
    /**
     * 第二开户行
     */
    @TableField("BANK_NAME_SECOND")
    private String bankNameSecond;
    /**
     * 是否下发
     */
    @TableField("IS_ISSUED")
    private Integer isIssued;
    /**
     * 合同号
     */
    @TableField("CONTRACT_NUMBER")
    private String contractNumber;
    /**
     * 合同起始时间
     */
    @TableField("CONTRACT_FROM")
    private LocalDateTime contractFrom;
    /**
     * 合同结束时间
     */
    @TableField("CONTRACT_TO")
    private LocalDateTime contractTo;
    /**
     * 预付金
     */
    @TableField("ADVANCE_MONEY")
    private Double advanceMoney;
    /**
     * 可用预付金
     */
    @TableField("AVAILABLE_ADVANCE_MONEY")
    private Double availableAdvanceMoney;
    /**
     * 锁定预付金
     */
    @TableField("LOCK_ADVANCE_MONEY")
    private Double lockAdvanceMoney;
    /**
     * 信用额度
     */
    @TableField("LINE_CREDIT")
    private Double lineCredit;
    /**
     * 附件id
     */
    @TableField("FILE_ID")
    private Integer fileId;
    /**
     * 关联的经销商CODE（该业务往来客户是一个经销商）
     */
    @TableField("ASSOCIATE_DEALER_CODE")
    private String associateDealerCode;
    /**
     * 关联的部门ID（该业务往来客户是一个部门）
     */
    @TableField("ASSOCIATE_DEPT_ID")
    private Integer associateDeptId;
    /**
     * 区域负责人
     */
    @TableField("AREA_PRINCIPAL")
    private String areaPrincipal;
    /**
     * 省
     */
    @TableField("PROVINCE")
    private String province;
    /**
     * 城市
     */
    @TableField("CITY")
    private String city;
    /**
     * 区县
     */
    @TableField("DISTRICT")
    private String district;
    /**
     * QQ号
     */
    @TableField("QQ")
    private String qq;
    /**
     * 业务往来客户等级 TM_PART_CUSTOMER_GRADE 主键：GRADE_ID
     */
    @TableField("PART_CUSTOMER_GRADE_ID")
    private Integer partCustomerGradeId;
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Boolean isDeleted;

    public PartCustomerPO() {
        super();
    }


    public Integer getPartCustomerId() {
        return partCustomerId;
    }

    public void setPartCustomerId(Integer partCustomerId) {
        this.partCustomerId = partCustomerId;
    }

    public String getDealerCode() {
        return dealerCode;
    }

    public void setDealerCode(String dealerCode) {
        this.dealerCode = dealerCode;
    }

    public String getCustomerCode() {
        return customerCode;
    }

    public void setCustomerCode(String customerCode) {
        this.customerCode = customerCode;
    }

    public Integer getCustomerTypeCode() {
        return customerTypeCode;
    }

    public void setCustomerTypeCode(Integer customerTypeCode) {
        this.customerTypeCode = customerTypeCode;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getCustomerSpell() {
        return customerSpell;
    }

    public void setCustomerSpell(String customerSpell) {
        this.customerSpell = customerSpell;
    }

    public String getCustomerShortName() {
        return customerShortName;
    }

    public void setCustomerShortName(String customerShortName) {
        this.customerShortName = customerShortName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getZipCode() {
        return zipCode;
    }

    public void setZipCode(String zipCode) {
        this.zipCode = zipCode;
    }

    public String getContactorName() {
        return contactorName;
    }

    public void setContactorName(String contactorName) {
        this.contactorName = contactorName;
    }

    public String getContactorPhone() {
        return contactorPhone;
    }

    public void setContactorPhone(String contactorPhone) {
        this.contactorPhone = contactorPhone;
    }

    public String getContactorMobile() {
        return contactorMobile;
    }

    public void setContactorMobile(String contactorMobile) {
        this.contactorMobile = contactorMobile;
    }

    public String getFax() {
        return fax;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public Double getPriceRate() {
        return priceRate;
    }

    public void setPriceRate(Double priceRate) {
        this.priceRate = priceRate;
    }

    public Integer getSalesBasePriceType() {
        return salesBasePriceType;
    }

    public void setSalesBasePriceType(Integer salesBasePriceType) {
        this.salesBasePriceType = salesBasePriceType;
    }

    public Integer getDataSources() {
        return dataSources;
    }

    public void setDataSources(Integer dataSources) {
        this.dataSources = dataSources;
    }

    public Integer getIsValid() {
        return isValid;
    }

    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }

    public Integer getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(Integer organizationId) {
        this.organizationId = organizationId;
    }

    public Double getTaxes() {
        return taxes;
    }

    public void setTaxes(Double taxes) {
        this.taxes = taxes;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getAccountNameSecond() {
        return accountNameSecond;
    }

    public void setAccountNameSecond(String accountNameSecond) {
        this.accountNameSecond = accountNameSecond;
    }

    public String getAccountSecond() {
        return accountSecond;
    }

    public void setAccountSecond(String accountSecond) {
        this.accountSecond = accountSecond;
    }

    public String getBankNameSecond() {
        return bankNameSecond;
    }

    public void setBankNameSecond(String bankNameSecond) {
        this.bankNameSecond = bankNameSecond;
    }

    public Integer getIsIssued() {
        return isIssued;
    }

    public void setIsIssued(Integer isIssued) {
        this.isIssued = isIssued;
    }

    public String getContractNumber() {
        return contractNumber;
    }

    public void setContractNumber(String contractNumber) {
        this.contractNumber = contractNumber;
    }

    public LocalDateTime getContractFrom() {
        return contractFrom;
    }

    public void setContractFrom(LocalDateTime contractFrom) {
        this.contractFrom = contractFrom;
    }

    public LocalDateTime getContractTo() {
        return contractTo;
    }

    public void setContractTo(LocalDateTime contractTo) {
        this.contractTo = contractTo;
    }

    public Double getAdvanceMoney() {
        return advanceMoney;
    }

    public void setAdvanceMoney(Double advanceMoney) {
        this.advanceMoney = advanceMoney;
    }

    public Double getAvailableAdvanceMoney() {
        return availableAdvanceMoney;
    }

    public void setAvailableAdvanceMoney(Double availableAdvanceMoney) {
        this.availableAdvanceMoney = availableAdvanceMoney;
    }

    public Double getLockAdvanceMoney() {
        return lockAdvanceMoney;
    }

    public void setLockAdvanceMoney(Double lockAdvanceMoney) {
        this.lockAdvanceMoney = lockAdvanceMoney;
    }

    public Double getLineCredit() {
        return lineCredit;
    }

    public void setLineCredit(Double lineCredit) {
        this.lineCredit = lineCredit;
    }

    public Integer getFileId() {
        return fileId;
    }

    public void setFileId(Integer fileId) {
        this.fileId = fileId;
    }

    public String getAssociateDealerCode() {
        return associateDealerCode;
    }

    public void setAssociateDealerCode(String associateDealerCode) {
        this.associateDealerCode = associateDealerCode;
    }

    public Integer getAssociateDeptId() {
        return associateDeptId;
    }

    public void setAssociateDeptId(Integer associateDeptId) {
        this.associateDeptId = associateDeptId;
    }

    public String getAreaPrincipal() {
        return areaPrincipal;
    }

    public void setAreaPrincipal(String areaPrincipal) {
        this.areaPrincipal = areaPrincipal;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public Integer getPartCustomerGradeId() {
        return partCustomerGradeId;
    }

    public void setPartCustomerGradeId(Integer partCustomerGradeId) {
        this.partCustomerGradeId = partCustomerGradeId;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.partCustomerId;
    }

    @Override
    public String toString() {
        return "PartCustomerPO{" +
        "partCustomerId=" + partCustomerId +
        ", dealerCode=" + dealerCode +
        ", customerCode=" + customerCode +
        ", customerTypeCode=" + customerTypeCode +
        ", customerName=" + customerName +
        ", customerSpell=" + customerSpell +
        ", customerShortName=" + customerShortName +
        ", address=" + address +
        ", zipCode=" + zipCode +
        ", contactorName=" + contactorName +
        ", contactorPhone=" + contactorPhone +
        ", contactorMobile=" + contactorMobile +
        ", fax=" + fax +
        ", priceRate=" + priceRate +
        ", salesBasePriceType=" + salesBasePriceType +
        ", dataSources=" + dataSources +
        ", isValid=" + isValid +
        ", organizationId=" + organizationId +
        ", taxes=" + taxes +
        ", accountName=" + accountName +
        ", account=" + account +
        ", bankName=" + bankName +
        ", accountNameSecond=" + accountNameSecond +
        ", accountSecond=" + accountSecond +
        ", bankNameSecond=" + bankNameSecond +
        ", isIssued=" + isIssued +
        ", contractNumber=" + contractNumber +
        ", contractFrom=" + contractFrom +
        ", contractTo=" + contractTo +
        ", advanceMoney=" + advanceMoney +
        ", availableAdvanceMoney=" + availableAdvanceMoney +
        ", lockAdvanceMoney=" + lockAdvanceMoney +
        ", lineCredit=" + lineCredit +
        ", fileId=" + fileId +
        ", associateDealerCode=" + associateDealerCode +
        ", associateDeptId=" + associateDeptId +
        ", areaPrincipal=" + areaPrincipal +
        ", province=" + province +
        ", city=" + city +
        ", district=" + district +
        ", qq=" + qq +
        ", partCustomerGradeId=" + partCustomerGradeId +
        ", isDeleted=" + isDeleted +
        "}";
    }


    /**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author quankk
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "partCustomerId");
    }


}
